﻿/**
 * 美食分享收藏类
 */

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FoodRaidersWebAPI.domainnew.Article;

namespace FoodRaidersWebAPI.domainnew.Favorite
{
    public class FavoriteFoodArticle
    {
        [Key]
        public int FavoriteFoodArticleID { get; set; }
        public DateTime DateTime { get; set; }//收藏日期
        public int UserID { get; set; }//所属用户 一对多自动识别为外键，而不是组合
        
        //FoodArticle外键
        [ForeignKey("FoodArticle")]
        public int FoodArticleID { get; set; }
        public FoodArticle FoodArticle { get; set; }//不以外键标明efcore会识别为组合，增加本体对象组合对象会一起增加 
    }
}